// const { resolve, join } = require('path');

import { resolve, join } from 'path'

import fs from 'fs';

// const fs = require('fs');

let options:any = null;

const isDev = process.env.NODE_ENV === 'development';

// console.log(join(
//       process.resourcesPath,
//       `app.asar.unpacked/plcChildProcess/conf/options.json`
//     ))

const scriptPath = isDev
  ? resolve(`./plcChildProcess/conf/options.json`)
  : join(
      process.resourcesPath,
      `app.asar.unpacked/plcChildProcess/conf/options.json`
    );

if (fs.existsSync(scriptPath)) {
  // console.log('exists');
  options = require(scriptPath) || null;
};

// options = initFn();

// console.log(options)

export default options;



